package com.hanxiaozhang.system.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * 路由实体
 *
 * @author hanxiaozhang
 * @email hanxiaozhang2018@sina.com
 * @date 2021-03-31
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RouterDTO implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 菜单主键
     */
    @JsonIgnore
    private Long menuId;


    /**
     * 父菜单ID，一级菜单为0
     */
    @JsonIgnore
    private Long parentId;


    /**
     * 路径
     */
    private String path;

    /**
     * 名称
     */
    private String name;

    /**
     * 图标
     */
    private String icon;

    /**
     * 组件
     */
    private String component;

    /**
     * 权限
     * 目前不需要
     */
    @JsonIgnore
    private List<String> authority;

    /**
     * 按钮权限
     */
    private List<PermissionDTO> permission;

    /**
     * 子路由
     */
    private List<RouterDTO> routes;


}
